
//------------------------------------------------------------------------------
// helper functions that do not require VxIrrBase or irr::video::IVideoDriver etc
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
//! get height of model ( bbox height )
irr::f32 GetModelHeight( irr::scene::ISceneNode * poNode );
//------------------------------------------------------------------------------
//! get width of model ( bbox  greatest of width or length )
irr::f32 GetModelWidth( irr::scene::ISceneNode * poNode );
//------------------------------------------------------------------------------
//! sets up a quad mesh of given dimenstion
void SetupQuadMesh( irr::scene::SMeshBuffer &mesh, irr::f32 f32Width );
//------------------------------------------------------------------------------
//! gets camera heading.. assumes camera is child of root
irr::f32 GetCameraHeading( irr::scene::ICameraSceneNode* camera );


//------------------------------------------------------------------------------
//! given a triangle with corners p1,p2,p3 ,UVs: uv1,uv2,uv3 and a point on triangle called newp then return the uv coordinates of the point
RCODE CalcUVCoordFromPointInTriangle(	irr::core::vector3df& v3fTriPoint1,		// triangle vertex point 1
										irr::core::vector3df& v3fTriPoint2,		// triangle vertex point 2
										irr::core::vector3df& v3fTriPoint3,		// triangle vertex point 3
										irr::core::vector3df& v3fPointInTri,	// point in triangle
										irr::core::vector2df& v2fUv1,			// uv coord of triangle point 1
										irr::core::vector2df& v2fUv2,			// uv coord of triangle point 2
										irr::core::vector2df& v2fUv3,			// uv coord of triangle point 3
										irr::core::vector2df& v2fRetUvCoord );	// return uv coordinate
